package com.blog.domain;

import java.sql.Date;
import java.text.SimpleDateFormat;

public class Blog {
	private int id;
	private String title;
	private String content;
	private Date createdTime;
	private String category;
	private int categoryId;
	/**
	 * 1.显示   0.隐藏
	 */
	private int ishow;
	/**
	 * 3.代表第一篇文章  1.最近一篇文章，2其他文章
	 */
	private int old;	
	public int getId() {
		return id;
	}
	public void setId(int id) {
		this.id = id;
	}
		
	public String getCategory() {
		return category;
	}
	public void setCategory(String category) {
		this.category = category;
	}
	public int getCategoryId() {
		return categoryId;
	}
	public void setCategoryId(int categoryId) {
		this.categoryId = categoryId;
	}
	public String getTitle() {
		return title;
	}
	public void setTitle(String title) {
		this.title = title;
	}
	public String getContent() {
		return content;
	}
	public void setContent(String content) {
		this.content = content;
	}
	public Date getCreatedTime() {
		return createdTime;
	}
	public String getCreatedTimeStr() {
		SimpleDateFormat sdf = new SimpleDateFormat("yyyy年MM月dd日  HH:mm:ss");
		String datestr = sdf.format(createdTime);
		return datestr;
	}
	
	public void setCreatedTime(Date createdTime) {
		this.createdTime = createdTime;
	}
	public int getIshow() {
		return ishow;
	}
	public void setIshow(int ishow) {
		this.ishow = ishow;
	}
	public int getOld() {
		return old;
	}
	public void setOld(int old) {
		this.old = old;
	}

}
